import router from "@/router/index";
import { ref } from "vue";
import { useIndexStore } from "@/stores/indexStore";
// const isShow = ref(1);
// 路由传参并打开子页面
export const OpenChildrenPage = (path, item, id) => {
  const useStore = useIndexStore();
  router.push({
    path: path,
    query: item,
  });
  if (id == undefined) return;
  useStore.isShow = id;
  console.log("id:", id);
};
// 路由接收参数
export const routeQuery = () => {
  //  console.log("sjj:",router.currentRoute.value);
  const { query } = router.currentRoute.value;
  return query;
};

// export { isShow };
